Skip to content

[pull] main from expo:main#957

Merged
pull[bot] merged 17 commits into
code:mainfrom
expo:main
Jun 11, 2026
Merged

[pull] main from expo:main#957
pull[bot] merged 17 commits into
code:mainfrom
expo:main

Conversation

@pull

@pull pull Bot commented Jun 11, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Ubax and others added 17 commits June 11, 2026 18:08
# Why

Until now `getMainSession`/`getForegroundSession` returned eager,
serialized snapshots of a session (the `MainSession`/`GenericSession`
union), so the data was frozen at the moment of the call and the full
metrics/logs collections were marshalled across the bridge every time.
We want a single live `Session` representation that reflects the
session's current state and only fetches the heavy collections when
asked.

# How

1. Introduce a native `Session` shared object (`SessionSharedObject` on
Android, `Session` on iOS) exposed to JS via `src/Session.ts`.
- Scalar fields (`id`, `type`, `startDate`) are snapshots captured when
the object is created.
- Mutable state (`isActive`, `getEndDate`) and the heavy collections
(`getMetrics`, `getLogs`) are fetched lazily so each call reflects live
state.
- Adds `addMetric(metric)` on the object — the session id is implied by
the receiver, so the new `MetricInput` type is `Omit<Metric,
'sessionId'>`.
2. Change the module surface:
- `getMainSession()` is now synchronous and returns the shared object
built from in-memory state, so it never returns `null`. Repeated calls
return the same static reference (`getMainSession() ===
getMainSession()`).
- `getForegroundSession()` resolves to the foreground `Session` shared
object or `null`.
- Export the native `Session` class on the module type so the web module
can substitute its own implementation.
3. Split the historic-session shape out into a new eager `DebugSession`
type (used by `getInactiveSessions()`), keeping serialized history
separate from the live shared object.
4. Android: fold the `SessionCoordinator` (added in
[#46702](#46702)) into
`SessionSharedObject`. The session id and start date are generated
synchronously so they are available to readers immediately, while
`startSessionWithIdAt` runs in a `by lazy` job;
`awaitSessionPersisted()` (`job.join()`) gates
`addMetrics`/`addLogs`/`stop` so no insert can race ahead of session
creation.
5. iOS: rework `Session`/`StoredSession` and add `JsMetric` to back the
shared object and the `addMetric` input.
6. Update `observe-tester` screens and the web module (`module.web.ts`)
to the new API.

# Test Plan

1. CI
2. Observe tester — verified sessions, metrics, and logs render on both
platforms.


# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Realised we have 2 endpoints but only 1 custom endpoint so we should
clarify how it will be used.

<!--
Please describe the motivation for this PR, and link to relevant GitHub
issues, forums posts, or feature requests.
-->

# How

Add clarification on what endpoints will actually be called.

<!--
How did you build this feature or fix this bug and why?
-->

# Test Plan

👀 

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why

Keep CI on a supported Node version and up-to-date GitHub Actions. Node
22 is aging out, and several action pins had imprecise or stale version
comments.

# How

- Bumped `node-version` to `24` (or `[22, 24]` matrices) across
workflows and docs examples.
- Updated Expo actions and other third-party actions, fixing the `# vX`
comments left by Dependabot to point at exact released versions.

# Test Plan

CI-only change. Verified by the workflow runs on this PR passing.

# Checklist

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why
Closes ENG-21850 , and gets expo-cli up-to-date with eas-cli:
expo/eas-cli#3746

# How
Added a --no-browser option for parity with eas-cli, and for anyone that
wants to keep the current behavior. Made the --browser option the
default when in an interactive env.

# Test Plan
Run tests. Also verified happy-path manually.

<!--
Please describe how you tested this change and how a reviewer could
reproduce your test, especially if this PR does not include automated
tests! If possible, please also provide terminal output and/or
screenshots demonstrating your test/reproduction.
-->

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
@pull pull Bot locked and limited conversation to collaborators Jun 11, 2026
@pull pull Bot added the ⤵️ pull label Jun 11, 2026
@pull pull Bot merged commit e701e30 into code:main Jun 11, 2026
32 of 34 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants